feat: rename publish command to release#4305
Merged
Merged
Conversation
Renames the primary Electron Forge `publish` command to `release` while keeping `publish` working as a hidden, deprecated alias. - CLI: register `release` as the primary command and add `publish` as a hidden alias that prints a deprecation warning to stderr before delegating to the exact same behavior via `runRelease()`. - Core API: rename the `publish()` API to `release()` (src/api/publish.ts -> release.ts, `PublishOptions` -> `ReleaseOptions`). Keep `ForgeAPI.publish()` and the `PublishOptions` type as `@deprecated` aliases for backward compatibility. - Templates: base template `package.json` now uses a `release` script (`electron-forge release`); update template verdaccio specs. - Tests: rename core spec to release.spec.ts; add CLI help assertions that `release` is listed and `publish` is hidden. Publisher plugin classes/interfaces and the `Publisher` concept are intentionally left unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KNJA1Q3Airp39YMZ4k46E8
MarshallOfSound
approved these changes
Jul 2, 2026
erickzhao
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Samuel Attard · Slack thread
Summarize your changes:
Renames the Electron Forge
publishcommand torelease, keepingpublishas a hidden, deprecated alias. Targets thenext(8.0.0) major line.Closes #2820
Before / After
electron-forge publishelectron-forge release.electron-forge publishstill works but is hidden from--helpand prints a deprecation warning to stderr before running the same behavior:How
packages/api/cli/src/electron-forge.ts): registersreleaseas the primary command and addspublishas a{ hidden: true }alias so it no longer appears in--help.electron-forge-publish.ts→electron-forge-release.ts(viagit mv). The release logic is now exported as a reusablerunRelease()function, mirroring howelectron-forge-make.tsexposesgetMakeOptions(). A new thinelectron-forge-publish.tsshim prints the deprecation warning and delegates torunRelease(), matching the existing commander executable-subcommand dispatch (commander runs the siblingelectron-forge-<command>.js).packages/api/core/src/api/):publish.ts→release.ts(viagit mv); the default export is nowrelease(), the options interface isReleaseOptions, and the trace/debug names arerelease()/electron-forge:release.ForgeAPI.release()is the primary method;ForgeAPI.publish()and thePublishOptionstype are kept as@deprecatedaliases that forward torelease, so existing programmatic consumers keep working.package.jsonpublishscript is now"release": "electron-forge release"; updated the vite/webpack template verdaccio specs accordingly.publish.spec.ts→release.spec.ts(imports the renamed API); added CLI help assertions thatreleaseis listed and thepublishalias is hidden.Scope / tradeoffs
PublisherBase.publish, publisher packages, thePublisherconcept, forge configpublishers, and internal identifiers likepublishTargets/PublishState/publish-dry-run) is intentionally left unchanged — that is a separate, larger surface and out of scope here.PublishOptions/api.publishwas the CLI bin), so the full API rename was done withpublish/PublishOptionsretained as deprecated aliases rather than the minimal alias-only fallback.